GetChnnelsInfo
Function
This API is used by the hot standby management device to obtain channel information from the working device.
Request Message
Parameter Description
Table 1
Parameter | Range | Type | Description |
---|---|---|---|
channels | "All" "CH1"…"CHx" "IP_CH1"…"IP_CHx" "WIFI_CH1"…"WIFI_CHx" | string array | |
base_x_public | object | For detailed information, please refer to Table 2. |
Table 2
Parameter | Range | Type | Description |
---|---|---|---|
key | string | ||
seq | int |
Sample:
POST /API/RecordPatch/GetChannelsInfo HTTP/1.1
{
"data": {
"channels": [
"CH1"
],
"base_x_public": {
"key": "0HPdedLykSzlof0GUwmVGFkkbyvSYGz4aQxGgn5nVnEw=",
"seq": 0
}
}
}
Response Message
Parameter Description
Table 3
Parameter | Range | Type | Description |
---|---|---|---|
channels | "All" "CH1"…"CHx" "IP_CH1"…"IP_CHx" "WIFI_CH1"…"WIFI_CHx" | object | For detailed information, please refer to Table 4. |
worker_mac | xx-xx-xx-xx-xx-xx | string | The MAC address of the working device. |
Table 4
Parameter | Range | Type | Description |
---|---|---|---|
enable | bool | Whether to enable the channel. | |
channel_index | int | Channel number of the frontend device. | |
protocol | string | ||
connect_method | "General", "Security" | string | "General": Prefer HTTP "Security": Prefer HTTPS |
camera_mode | "Auto", "Normal" | string | Camera mode. |
main_url | string | The url of the main stream when connecting using rtsp. | |
sub_url | string | The url of the substream when connecting using rtsp. | |
ip | string | ||
username | string | ||
peer_key | string | ||
cipher | string | Encrypted password. | |
seq | int | ||
port | int |
Sample:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {
"channels": {
"CH1": {
"enable": true,
"channel_index": 0,
"protocol": "Private",
"connect_method": "General",
"camera_mode": "Auto",
"main_url": "",
"sub_url": "",
"ip": "172.16.11.50",
"username": "admin",
"peer_key": "07uKqG8PGyqWLbqt7vN18Rqg4p17+UfRmcZAZQ0NKDAc=",
"cipher": "0XfBrLSeFZiEFjNl0tiMauJ/aWDkuTvDXHextl1fZrgppV4KEUw==",
"seq": 0,
"port": 80
}
},
"worker_mac": "xx-xx-xx-xx-xx-xx"
}
}